package model;
import java.io.*;
import java.util.ArrayList;

import org.eclipse.jface.viewers.*;
public class FrameworkTreeContentProvider implements ITreeContentProvider
{
  public Object[] getChildren(Object element)
  {
	ArrayList list = ((FrameworkNode) element).getChild();
	if(list==null)
		return new Object[0];
	int length = list.size();
	Object[] kids = new Object[length];
	for(int i=0;i<length;i++) {
		kids[i]=list.get(i);
	}
    return kids;
  }
  public Object[] getElements(Object element)
  {
    return getChildren(element);
  }
  public boolean hasChildren(Object element)
  {
    return getChildren(element).length > 0;
  }
  public Object getParent(Object element)
  {
    return null;
  }
  public void dispose()
  {
  }
  public void inputChanged(Viewer viewer, Object old_input, Object new_input)
  {
  }
}